function CategoriesFilterView(div, catFilter, categories) {

	var self = this;
	el(div).html('<table width="100%">' +
		'<tr><td>Только категории:</td><td align="right"><div id="' + div + 'Combo"></div></td></tr>' +
		'<tr><td colspan="2" align="left"><div id="' + div + 'List"></div></td></tr>' +
		'</table>');
	this.treeCombo = new TreeComboView(div + 'Combo', {
		dropDownWidth: 120,
		title: 'категории',
		requestEvent: 'categories-request',
		updateEvent: 'categories-loaded'
	}, categories);
	this.treeCombo.selectIds(catFilter.idsMap);

	$(this.treeCombo).on('change', function (event, data) {
		var categoryIdsMap = {};
		$.each(data.items, function(index, category) {
			categoryIdsMap[category.id] = category.id;
		});
		catFilter.set(categoryIdsMap);
		self.refreshSelection(data.items);
	});

	this.refreshSelection = function(categories) {
		var list = [];
		$.each(categories, function(index, category) {
			list.push(category.fullName());
		});
		el(div + 'List').html(list.join('<br>'));
	};
};